<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html class=" -webkit-">
<head>
<meta charset="utf-8">
<title>杰利联合</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta
	content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
	name="viewport">
<meta content="application/xhtml+xml;charset=UTF-8"
	http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style"
	content="black-translucent">
<link rel="stylesheet" type="text/css"
	href="${ctxStatic}/jiu/css/mobile_module.css?v=1492648593" media="all" />
	<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
	
<script type="text/javascript">
			//静态变量
			var IMG_PATH = "/Public/Home/images";
			var STATIC_PATH = "/Public/static";
			var SITE_URL = "http://jiujiu.hbweiyinqing.cn";
			var WX_APPID = "";
			var WXJS_TIMESTAMP = '1492648593';
			var NONCESTR = 'wb03tri4jVWJDK6S';
			var SIGNATURE = '1d9c103ed1aa1597e5be8e1056a9f1764f42df75';
		</script>
<script type="text/javascript"
	src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript"
	src="http://me.hbweiyinqing.cn/Public/js/zepto.js"></script>
<script type="text/javascript"
	src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
<script type="text/javascript"
	src="${ctxStatic}/jiu/js/prefixfree.min.js?v=1492648593"></script>
<script type="text/javascript"
	src="${ctxStatic}/jiu/js/dialog.js?v=1492648593"></script>
<script type="text/javascript"
	src="${ctxStatic}/jiu/js/flipsnap.min.js?v=1492648593"></script>
<script type="text/javascript"
	src="${ctxStatic}/jiu/js/mobile_module.js?v=1492648593"></script>
<link href="${ctxStatic}/jiu/css/common.css?v=1492648593"
	rel="stylesheet" type="text/css">
<link href="${ctxStatic}/jiu/css/shop.css?v=14928593" rel="stylesheet"
	type="text/css">
<script type="text/javascript"
	src="http://www.zhangxinxu.com/study/js/mini/jquery.scrollLoading-min.js"></script>
<!--弹出层-->
<style type="text/css">
#dialogBg {
	width: 100%;
	height: 100%;
	background-color: #000000;
	opacity: .6;
	filter: alpha(opacity = 0.6);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	display: none;
}

#tanmu {
	width: 300px;
	height: 290px;
	display: none;
	background-color: #ffffff;
	position: fixed;
	top: 50%;
	left: 50%;
	margin: -145px 0 0 -150px;
	z-index: 10000;
	border: 1px solid #ccc;
	border-radius: 10px;
	-webkit-border-radius: 10px;
	box-shadow: 3px 2px 4px rgba(0, 0, 0, 0.2);
	-webkit-box-shadow: 3px 2px 4px rgba(0, 0, 0, 0.2);
	text-align: center;
}

.dialogTop {
	letter-spacing: 1px;
	text-align: right;
	font-size: 24px;
	color: #222222;
	margin-top: -5px;
	margin-right: 10px;
}

.queren {
	margin-top: 5px;
	border-right: 1px solid #eee;
	box-sizing: border-box;
	font-size: 16px;
	text-align: center;
	text-decoration: none;
	overflow: hidden;
	width: 50%;
	height: 35px;
	line-height: 35px;
	float: left;
	color: #30B0F3;
}

.fanhui {
	margin-top: 5px;
	box-sizing: border-box;
	font-size: 16px;
	text-align: center;
	text-decoration: none;
	overflow: hidden;
	width: 50%;
	height: 35px;
	line-height: 35px;
	float: right;
	color: #B5B4B3;
}
<!--图片上传-->
.z_photo {
	width: 100%;
	height: 135px;
	padding: 0.3rem;
	overflow: auto;
	clear: both;

	/*border: 1px solid #555;*/
}

.z_photo img {
	width: 60px;
	height: 60px;
	margin-bottom: 10px;
}

.z_addImg {
	float: left;
	margin-right: 0.2rem;
}

.z_file {
	width: 60px;
	height: 60px;
	background: url(img/z_add.png) no-repeat;
	background-size: 100% 100%;
	float: left;
	margin-right: 0.2rem;
}

.z_file input::-webkit-file-upload-button {
	width: 1rem;
	height: 1rem;
	border: none;
	position: absolute;
	outline: 0;
	opacity: 0;
}

.z_file input#file {
	display: block;
	width: auto;
	border: 0;
	vertical-align: middle;
	background-color: #fff;
	padding: 0px;
}
/*遮罩层*/
.z_mask {
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, .5);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 999;
	display: none;
}

.z_alert {
	width: 4rem;
	height: 3rem;
	border-radius: .2rem;
	background: #fff;
	font-size: .24rem;
	text-align: center;
	position: absolute;
	left: 50%;
	top: 50%;
	margin-left: -2rem;
	margin-top: -1.5rem;
}

.z_alert p:nth-child(1) {
	line-height: 2.4rem;
}

.z_alert p:nth-child(2) span {
	display: inline-block;
	width: 49%;
	height: .5rem;
	line-height: .5rem;
	float: left;
	border-top: 1px solid #ddd;
}

.z_cancel {
	border-right: 1px solid #ddd;
}
.yonghupingjia {
	font-family: "微软雅黑";
	background-color: #FFFFFF;
	margin-top: 10px;
	padding: 10px;
	color: black;
	border-bottom: 1px solid #ccc;
	border-top: 1px solid #ccc;
}

.lpr {
	display: flex;
	justify-content: space-between;
	align-items: center;
	line-height: 26px;
}

.show_number {
	margin-left: 10px;
}

.show_number li {
	width: 240px;
	border: 1px solid #ccc;
	padding: 10px;
	margin-right: 5px;
	margin-bottom: 20px;
}

.atar_Show {
	background: url(${ctxStatic}/jiu/img/s2.png);
	width: 110px;
	height: 22px;
}

.atar_Show p {
	background: url(${ctxStatic}/jiu/img/s1.png);
	left: 0;
	height: 22px;
	/*width: 130px;*/
}

.show_number li span {
	display: inline-block;
	line-height: 21px;
}

.clearfix::after {
	display: block;
	content: '';
	height: 0;
	overflow: hidden;
	clear: both;
}
</style>
</head>
<body>

	<div class="container " style="position:relative;" >
		<div class="modal fade" style="margin-top: 30%;" id="myModal"
			tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header" style="width:100%;position:relative">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close" style="position:absolute;right:10px;text-align:right">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">操作提示</h4>
					</div>
					<div class="modal-body"></div>
					<div class="modal-footer" style="display:flex;justify-content:space-between;" >
						<button type="button" class="btn btn-success" data-dismiss="modal"
							id="yes" style="width:100px">需要</button>
						<button style="width:100px" type="button" class="btn btn-danger" data-dismiss="modal"
							id="no">不需要</button>
					</div>
				</div>
			</div>
		</div>
		<!-- 相册 -->
		<div class="banner" style="height: 187px;">
			<ul
				style="width: 4114px; height: 187px; transition-property: transform; transition-timing-function: cubic-bezier(0, 0, 0.25, 1); transition-duration: 350ms; transform: translate3d(-3366px, 0px, 0px);">
				<c:forEach items="${jiuCarouselList}" var="jiuCarousel">
					<li style="width: 374px; height: 187px;"><img
						src="${ctxUser }/jiu/${jiuCarousel.ico}"
						style="width: 374px; height: 187px;"></li>
				</c:forEach>
			</ul>
			<span class="identify"> <c:forEach items="${jiuCarouselList}"
					var="jiuCarousel" varStatus="vstatus">
					<em class="${vstatus.index eq 0?'cur':''}"></em>
				</c:forEach>
			</span>
		</div>

		<input type="hidden" name="goods_id" value="9">
		<div class="detail_info">
			<div class="info_item">
				<h6 class="name">${jiuManufactor.name}</h6>
				<p class="price" style="font-size: 16px;">
					<span style="font-size: 12px; color: #A0A0A0;">兑换积分：</span><span
						id="price">${jiuManufactor.price}积分</span>
				</p>
				<p>
					<span style="font-size: 12px; color: #A0A0A0;">库存：</span><span
						id="price">${jiuManufactor.inventory}件</span>
				</p>
			</div>
			<div class="info_item">
				<span style="font-size: 18px;">数量：</span>
				<div class="buy_count">
					<a class="reduce" href="javascript:jian()">-</a> <input type="text"
						id="buyCount" onkeyup="this.value=this.value.replace(/\D/g,'')"
						name="buyCount" value="1"> <a class="add"
						href="javascript:jia()">+</a>
				</div>
			</div>
		</div>
		<div class="yonghupingjia" style=""
			onclick="javascript:toSeeAllEvaluate(${jiuManufactor.id})">
			<div
				style="border-bottom: 1px solid #eee; font-size: 16px; padding-bottom: 5px;">用户评价</div>
			<div class="" style="height: 30px">
				<%-- <div style="flex: 2;">
					<div style="display: flex;display:-webkit-flex;margin-top: 10px;">
						<!-- <div>总体评价 </div> -->
						<div class="show_number clearfix">
							<div class="atar_Show">
									<p tip='<fmt:formatNumber type="number" value="${empty evalute[1].d ? 0.00 : evalute[1].d}" pattern="0" maxFractionDigits="0"/>'></p>
							</div>
						</div>
					</div>
					<p><span style="color: #ff1200;font-weight: bold;margin-right: 5px;font-size: 20px;"><fmt:formatNumber type="number" value="${empty evalute[0].d ? 0.00 : evalute[0].d}" pattern="0" maxFractionDigits="0"/></span>人评价过商品</p>
					</div> --%>
				<div style="float: left; line-height: 40px">
					<span
						style="color: #ff1200; font-weight: bold; margin-right: 5px; font-size: 20px;"><fmt:formatNumber
							type="number" value="${empty evalute[0].d ? 0.00 : evalute[0].d}"
							pattern="0" maxFractionDigits="0" /></span>人评价过商品
				</div>
				<div
					style="font-size: 18px; color: #737370; margin-top: 10px; float: right; line-height: 15px">
					&gt;</div>
				<div style="clear: both"></div>
			</div>
		</div>
		<!-- 商品介绍 -->
		<div class="detail_content">
			<h6 class="t">厂家介绍</h6>
			<div class="content">${jiuManufactor.manDescribe}</div>
		</div>
	</div>

	<div class="detail_bottom">
		<a class="buy_now" href="javascript:exchange(${jiuManufactor.id})">立即兑换</a>
	</div>
	<p class="copyright"></p>

	<script type="text/javascript">
			
			window.alert = function(name){
			  var iframe = document.createElement("IFRAME");
			  iframe.style.display="none";
			  iframe.setAttribute("src", 'data:text/plain,');
			  document.documentElement.appendChild(iframe);
			  window.frames[0].window.alert(name);
			  iframe.parentNode.removeChild(iframe);
			 };		
					 
			 window.confirm = function (message) {
			   var iframe = document.createElement("IFRAME");
			   iframe.style.display = "none";
			   iframe.setAttribute("src", 'data:text/plain,');
			   document.documentElement.appendChild(iframe);
			   var alertFrame = window.frames[0];
			   var result = alertFrame.window.confirm(message);
			   iframe.parentNode.removeChild(iframe);
			   return result;
			 };
			 
			 window.confirm = function (message) {
			   var iframe = document.createElement("IFRAME");
			   iframe.style.display = "none";
			   iframe.setAttribute("src", 'data:text/plain,');
			   document.documentElement.appendChild(iframe);
			   var alertFrame = window.frames[0];
			   var result = alertFrame.window.confirm(message);
			   iframe.parentNode.removeChild(iframe);
			   return result;
			 };
			
		
		
			
		   $(function() {
				
				$(".close").click(function(){
					window.location.reload();
				});
				
				//通用banner 滑动
				$.WeiPHP.initBanner(true, 5000);

				$.WeiPHP.gallery('.photoList', '.photoList ul');
				
				
				
				
		
			})
			
			
			
			
			function jia(){
			   $('#buyCount').val(parseInt($('#buyCount').val())+1);
		   	}
		   
		   	function jian(){
		   		if(parseInt($('#buyCount').val())>1){
				   	 $('#buyCount').val(parseInt($('#buyCount').val())-1);
		   		}
		   	}
		   	
		   	var tag=0;
		   	function exchange(factorId){
		   		if(tag==1){
		   			return;
		   		}
		   		var num=$('#buyCount').val();
		   		tag=1;
		   		$.getJSON("${ctxFront }/jiu/exchange",{factorId:factorId,num:num}, function(data){
                   
               
                   if(data.msg=='success'){
            		   $('#myModal').modal('show')  ;
            		   $(".modal-body").text(data.message);
            		   
                	   $("#yes").click(function(){
                    	    tag=0;
                     	   window.location.href="${ctxFront }/jiuApply/toDetailedList?uid=${uid}&orderId="+data.orderId+"&random="+Math.random();  
                	   });
                	   $("#no").click(function(){
                		   tag=0;
                    	   window.location.href="${ctxFront }/jiu/dingdan?uid=${uid}&random="+Math.random();  
                	   })	   
                   }else{
                	     $('#myModal').modal('show')  ;
                 	    $(".modal-body").text(data.message);
                   }
                });
		   	}
		   	
		   	
		   	function toSeeAllEvaluate(id){
		   		
		   	 	window.location.href="${ctxFront }/jiu/toStoreEvaluateList?uid=${uid}&factorId="+id;
		   	}
		</script>
	<script type="text/javascript" src="${ctxStatic}/jiu/js/startScore.js"></script>
	<script>
			//显示分数
			$(".show_number div p").each(function(index, element) {
				var num = $(this).attr("tip");
				var www = num * 2 * 11; //
				$(this).css("width", www);
			});
		</script>
	<div class="box_overlay" style="display: none;"></div>
	<div class="dialog" style="display: none;">
		<div class="dialog_content"></div>
	</div>
</body>

</html>